package com.ailk.kbi.kbiwarden.wsi.util;

import java.util.Hashtable;
import java.util.UUID;



/**
 * 暂存仓库
 * @author kyunra
 *
 */
public class TransferStorehouse {
	private static Hashtable<String, String> drawers = new Hashtable<String, String>();

	public static synchronized String deposit(String source) {
		String uuid = UUID.randomUUID().toString();
		drawers.put(uuid, source);
		return uuid;
	}


	public static synchronized String draw(String voucher) {
		String source = drawers.get(voucher);
		drawers.remove(voucher);
		return source;
	}

}
